package jco3.sessionManagement_JCoContext_Different;

import com.sap.conn.jco.JCoDestination;
import com.sap.conn.jco.JCoDestinationManager;
import com.sap.conn.jco.JCoException;
import com.sap.conn.jco.ext.Environment;

public class DestinationProvider {

	public static JCoDestination getDestination() throws JCoException{
		// create an instance of SessionReferenceProvider
        // and register in environment
		SessionReferencProviderImpl provider = new SessionReferencProviderImpl();
		Environment.registerSessionReferenceProvider(provider);
		
		JCoDestination destination = JCoDestinationManager.getDestination("ECC");
		return destination;
		
	}
}
